package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ClientUserClientFallBack;
import cn.cs.fallback.ComplaintTitleFallBack;
import cn.cs.pojo.ClientRepRel;
import cn.cs.pojo.ClientUser;
import cn.cs.pojo.ComplaintTitle;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = ComplaintTitleFallBack.class)
public interface ComplaintTitleClient {


    @RequestMapping(value = "/getComplaintTitleById", method = RequestMethod.POST)
    public ComplaintTitle getComplaintTitleById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getComplaintTitleListByMap", method = RequestMethod.POST)
    public List<ComplaintTitle> getComplaintTitleListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getComplaintTitleCountByMap", method = RequestMethod.POST)
    public Integer getComplaintTitleCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addComplaintTitle", method = RequestMethod.POST)
    public Integer addComplaintTitle(@RequestBody ComplaintTitle complaintTitle) throws Exception;

    @RequestMapping(value = "/modifyComplaintTitle", method = RequestMethod.POST)
    public Integer modifyComplaintTitle(@RequestBody ComplaintTitle complaintTitle) throws Exception;

    @RequestMapping(value = "/deleteComplaintTitleById", method = RequestMethod.POST)
    public Integer deleteComplaintTitleById(@RequestParam("id") String id) throws Exception;
}

